package it.polito.test;

import it.polito.let.java.JavaMethod;
import it.polito.let.java.JavaProgram;

public class Serializer2 {

	public static void main(String[] params) {

		try {
			JavaProgram myprog = new JavaProgram("Prova", true);
			JavaMethod main = myprog.getMain();
			//myprog.setPackage("it.polito.let.codegen");
			myprog.addImport("java.io.*");
			myprog.addImport("it.polito.let.util.*");
			myprog.addMethod(new String[] {"private"}, "void", "asd", new String[]{"String ciao"});
			myprog.addSerAttribute("lol", "ciao");
			main.appendStatement("System.out.println(\"lol = \"+lol);");
			//System.out.print(myprog.toString());
			myprog.generateJavaCode("generated");
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
